from random import random

def epreuve_bernoulli(p):
    if random()<=p :
        return 1
    else :
        return 0

def schema_bernoulli(n,p):
    resultat = []
    for i in range(n) :
        resultat = resultat + [epreuve_bernoulli(p)]
    return resultat
    

total = 0

for i in range(...):
    resultat = schema_bernoulli(... , ...)
    if sum(resultat) == 2 :
        total = total + 1
        
print(total / ...)
    